package com.dmap.admin.service.backgroundv2;

import com.dmap.admin.controller.backgroundv2.param.CompanyAndUserV2Param;
import com.dmap.admin.controller.backgroundv2.param.CompanySelectParam;
import com.dmap.admin.po.Company;

import java.util.List;

/**
 * \* User: helei
 * \* Date: 02/05/18
 * \* Description:公司相关接口
 * \
 */
public interface CompanyService {

    Company insertCompany(CompanyAndUserV2Param param);

    boolean updateCompany(CompanyAndUserV2Param param);

    Company selectById(Long id);

    Company selectByAdministratorId(Long administratorId);

    List<Company> selectByIdList(List<Long> idList);

    List<Company> selectChildrenById(Long id);

    /**
     * 验证 Number 或 Name 或 AdministratorId 是否已存在
     *
     * @param number          公司编号
     * @param name            公司名称
     * @param administratorId 公司管理员ID
     * @return
     */
    boolean validateNumberOrNameOrAdministratorIdIsExist(String number, String name, String administratorId);

    int countByCompanySelectParam(CompanySelectParam param);

    List<Company> selectByCompanySelectParam(CompanySelectParam param);

}